
set(embed_txt_files ../spiffs/device.html 
   ../spiffs/index.html 
   ../spiffs/login.html 
   ../spiffs/network.html 
   ../spiffs/ota.html 
   ../spiffs/wlan.html
   ../spiffs/css/style.css 
   ../spiffs/js/common.js 
   ../spiffs/js/device.js 
   ../spiffs/js/index.js 
   ../spiffs/js/login.js 
   ../spiffs/js/network.js 
   ../spiffs/js/ota.js 
   ../spiffs/js/wlan.js
   ../spiffs/img/favicon.ico)

if(CONFIG_EXAMPLE_ENABLE_WEB_ROUTER)
    if(CONFIG_WEB_USE_FATFS)
        idf_component_register(SRC_DIRS "."
                        INCLUDE_DIRS ".")
        spiffs_create_partition_image(storage ../spiffs FLASH_IN_PROJECT)
    else()
        idf_component_register(SRC_DIRS "."
                        INCLUDE_DIRS "."
                        EMBED_FILES ${embed_txt_files})
    endif()
else()
    idf_component_register(SRC_DIRS "."
                    INCLUDE_DIRS "."
                    EXCLUDE_SRCS "i2s_std_example_main.c" "wifi_http_config.c" "app_main.c" "modem_http_config.c" "modem_http_config.h" )
endif()
